<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-md-12">
        <!--breadcrumbs start -->
        <ul class="breadcrumb panel">
            <li><a href="#"><i class="fa fa-home"></i> 首页</a></li>
            <li><a href="#">栏目管理</a></li>
            <li class="active"><a href="<?php echo e(url('cate/add')); ?>">添加</a></li>
        </ul>
        <!--breadcrumbs end -->
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-body">
    <?php if($page[0]): ?>
        <table class="table table-bordered table-striped">
            <tr class="success">
                <td>栏目名称</td>
                <td>路由地址</td>
                <td>栏目排序</td>
                <td>分页条数</td>
                <td>栏目模型</td>
                <td>首页模板</td>
                <td>阅读模板</td>
                <td>操作</td>
            </tr>
            <?php $__currentLoopData = $list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td><?php echo e($key['htmls']); ?><?php echo e($key['name']); ?></td>
                <td><?php echo e($key['html']); ?></td>
                <td><?php echo e($key['isorder']); ?></td>
                <td><?php echo e($key['pagesize']); ?></td>
                <td><?php echo e($key['model_name']); ?></td>
                <td><?php echo e($key['readtpl']); ?></td>
                <td><?php echo e($key['readtpl']); ?></td>
                <td>
                    <a class="btn btn-primary btn-xs" href="<?php echo e(url('cate/edit',['id'=>$key['cate_id']])); ?>">编辑</a>
                    <button class="btn btn-default btn-xs" type="button" onclick="del(<?php echo e($key['cate_id']); ?>);">删除</button>
                </td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </table>
        <?php echo e($page->links()); ?>

    <?php else: ?>
        暂无数据
    <?php endif; ?>
    <!-- <?php echo e(Request::getPathInfo()); ?> -->
        <!-- <nav>
            <ul class="pagination">
                <li class="disabled"><a href="#"><span>&laquo;</span></a></li>
            <li class="active"><a href="#">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">4</a></li>
            <li><a href="#">5</a></li>
                <li><a href="#"><span aria-hidden="true">&raquo;</span></a></li>
            </ul>
        </nav> -->
    </div>
</div>
<?php $__env->stopSection(); ?>



<?php $__env->startSection('js'); ?>
<script src="<?php echo e(asset('adminex')); ?>/layer/layer.js"></script>
<script type="text/javascript">
    function del(i){
        var i=i;
        layer.confirm('确定要删除吗？', {
          btn: ['是','否'] //按钮
        }, function(){
                $.post('<?php echo e(url("cate/del")); ?>',{id:i,'_token':'<?php echo e(csrf_token()); ?>'},function(data){
                    if(data==1){
                        layer.alert('删除成功');
                        location.reload();
                    }else{
                        layer.alert('删除失败')
                    }
                });
        }, function(){
        });
    }
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>